package uk.ac.bath.machines.tristate;

import java.io.StringWriter;
import uk.ac.bath.legacy.Value;


public class Mult extends BinaryOperator {

    public void binaryOp(Value a, Value b, Value c) {
        double result = a.val * b.val;
        //if (result > Value.maxValue.doubleValue()) result = Value.maxValue.doubleValue();
        c.set(result);
    }

    public int getStateSize() {
        return 3;
    }

    public int nIn() {
        return 2;
    }

    public int nOut() {
        return 1;
    }

    public Object clone() {
        return this;
    }

    public void toString(StringWriter w) {
        w.write("And ");
    }
}
